<?php

class imageslidermodule_config {
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->orderby= 0;
            $object->image_col= 0;            
		} else {
			$form->meta('id',$object->id);
		}

		$order_options = array(
			0=>'No sort, by rank order',
			1=>'Alphabetical By Name',
			2=>'Reverse Alphabetical By Name',
			3=>'Sort random'
		);
		$form->register('orderby','Sorting',new dropdowncontrol($object->orderby,$order_options));
        $form->register('image_col',"Banner Collection",new file_collection_control($object->image_col));
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->orderby = $values['orderby'];
        $object->image_col = intval($values['image_col']);
        
		return $object;
	}
}

?>